package com.temple.comfig;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@Configuration
public class WebConfig implements WebMvcConfigurer {

//    @Bean
//    public LoginInterceptor loginInterceptor() {
//        return new LoginInterceptor();
//    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

//        InterceptorRegistration ir = registry.addInterceptor(loginInterceptor());
//        //swagger2 UI
//        ir.excludePathPatterns("/webjars/**");
//        ir.excludePathPatterns("/v2/**");
//        ir.excludePathPatterns("/swagger-resources/**");
//        ir.excludePathPatterns("/doc.html");
//        ir.excludePathPatterns("/static/**");
//        ir.excludePathPatterns("classpath:/static/");
//        ir.excludePathPatterns("swagger-ui.html");
//        ir.excludePathPatterns("classpath:/META-INF/resources/");
//        ir.excludePathPatterns("/webjars/**");
//        ir.excludePathPatterns("classpath:/META-INF/resources/webjars/");
//        ir.excludePathPatterns("/sys/login");
//        ir.excludePathPatterns("/user/register");


    }
}
